package com.xjzp.business.db.hibernate.po.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the tb_test_subject table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="tb_test_subject"
 */

public abstract class BaseTbTestSubject  implements Serializable {

	public static String REF = "TbTestSubject";
	public static String PROP_SUBJECT_NAME = "SubjectName";
	public static String PROP_SUB1 = "Sub1";
	public static String PROP_ID = "Id";


	// constructors
	public BaseTbTestSubject () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseTbTestSubject (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String subjectName;
	private java.lang.String sub1;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="increment"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: subject_name
	 */
	public java.lang.String getSubjectName () {
		return subjectName;
	}

	/**
	 * Set the value related to the column: subject_name
	 * @param subjectName the subject_name value
	 */
	public void setSubjectName (java.lang.String subjectName) {
		this.subjectName = subjectName;
	}



	/**
	 * Return the value associated with the column: sub_1
	 */
	public java.lang.String getSub1 () {
		return sub1;
	}

	/**
	 * Set the value related to the column: sub_1
	 * @param sub1 the sub_1 value
	 */
	public void setSub1 (java.lang.String sub1) {
		this.sub1 = sub1;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.xjzp.business.db.hibernate.po.TbTestSubject)) return false;
		else {
			com.xjzp.business.db.hibernate.po.TbTestSubject tbTestSubject = (com.xjzp.business.db.hibernate.po.TbTestSubject) obj;
			if (null == this.getId() || null == tbTestSubject.getId()) return false;
			else return (this.getId().equals(tbTestSubject.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}